package com.db.entity;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.springframework.stereotype.Repository;

@Repository
@Entity
@Table(name="M_USER")
public class User {
	
	@Id
	@Column(name="USER_UUID",length=32)
	@GenericGenerator(name="systemUUID",strategy="uuid")
	@GeneratedValue(generator="systemUUID")
	private String userid;
	
	@Column(name="USER_ID", length=8)
	private int usernum;
	@Column(name="USER_NAME", length=16)
	private String username;
	@Column(name="PASSWORD", length=32)
	private String password;
	@OneToMany
	@JoinColumn(name="recordId")
	private Set<WorkingHoursRecord> records;
	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public int getUsernum() {
		return usernum;
	}

	public void setUsernum(int usernum) {
		this.usernum = usernum;
	}

	public Set<WorkingHoursRecord> getRecords() {
		return records;
	}

	public void setRecord(Set<WorkingHoursRecord> record) {
		this.records = record;
	}
	
}
